import fetch from '@/utils/fetch'

// 选品中心
export function getSysKdCodeList(params) {
    return fetch({
        url: '/api/sysKdCode/getSysKdCodeList',
        method: 'get',
        params
    })
}
// 数据字典
export function sysDict_list(params) {
    return fetch({
        url: '/api/sysDict/list',
        method: 'get',
        params
    })
}
export function sysDict_delete(params) {
    return fetch({
        url: '/api/sysDict/delete',
        method: 'delete',
        params
    })
}
export function sysDict_update(data) {
    return fetch({
        url: '/api/sysDict/update',
        method: 'put',
        data
    })
}
export function sysDict_add(data) {
    return fetch({
        url: '/api/sysDict/add',
        method: 'post',
        data
    })
}

export function sysDict_childList(params) {
    return fetch({
        url: '/api/sysDict/data/list',
        method: 'get',
        params
    })
}

export function sysDict_childDelete(params) {
    return fetch({
        url: '/api/sysDict/data/delete',
        method: 'delete',
        params
    })
}
export function sysDict_childUpdate(data) {
    return fetch({
        url: '/api/sysDict/data/update',
        method: 'put',
        data
    })
}
export function sysDict_childAdd(data) {
    return fetch({
        url: '/api/sysDict/data/add',
        method: 'post',
        data
    })
}

export function sysDict_byType(params) {
    return fetch({
        url: '/api/sysDict/byType',
        method: 'get',
        params
    })
}